import request from '@/utils/request'

// 查询运费支付列表
export function listFarepay(query) {
  return request({
    url: '/farepay/farepay/list',
    method: 'get',
    params: query
  })
}

// 查询运费支付详细
export function getFarepay(guid) {
  return request({
    url: '/farepay/farepay/' + guid,
    method: 'get'
  })
}

// 新增运费支付
export function addFarepay(data) {
  return request({
    url: '/farepay/farepay',
    method: 'post',
    data: data
  })
}

// 修改运费支付
export function updateFarepay(data) {
  return request({
    url: '/farepay/farepay',
    method: 'put',
    data: data
  })
}

// 删除运费支付
export function delFarepay(guid) {
  return request({
    url: '/farepay/farepay/' + guid,
    method: 'delete'
  })
}

// 运费支付发起
export function startFarepay(data) {
  return request({
    url: '/farepay/farepay/save',
    method: 'post',
    params: data
  })
}

// 导出运费支付
export function exportFarepay(query) {
  return request({
    url: '/farepay/farepay/export',
    method: 'get',
    params: query
  })
}

// 新增运费支付明细( 物流订单)
export function addFarepDetail(data) {
  return request({
    url: '/farepay/farepayitem',
    method: 'post',
    data: data
  })
}

// 删除运费支付明细( 物流订单)
export function delFarepDetail(guid) {
  return request({
    url: '/farepay/farepayitem/' + guid,
    method: 'delete'
  })
}
